1. Field of the Invention
The present invention relates to an A/D converter with noise elimination function in a semiconductor device.
2. Description of Related Art
FIG. 10 is a block diagram showing a configuration of a conventional A/D converter. In FIG. 10, the reference numeral 1 designates an A/D conversion reference voltage Vref; 2 designates a noise filtering module for removing noise from the A/D conversion reference voltage Vref 1; 3 designates an A/D conversion module for converting an analog input Ain to a digital output with reference to the A/D conversion reference voltage Vref 1; and 4 designates an A/D controller for controlling the A/D conversion module 3.

FIGS. 11A and 11B are tables illustrating a setting method of the A/D conversion reference voltage Vref of the A/D converter.
Next, the operation of the conventional A/D converter will be described.
In FIG. 10, the noise filtering module 2 removes the noise of the A/D conversion reference voltage Vref 1, and supplies its output to the A/D conversion module 3.
FIG. 11A gives expressions of the relationships between the A/D conversion reference voltage Vref 1 and the reference voltage VREF in the A/D conversion module 3; and FIG. 11B illustrates the variations in the content of the A/D conversion register in the A/D conversion module 3 during the A/D conversion.
When the A/D conversion is started, the A/D conversion register is placed at xe2x80x9c0 . . . 0xe2x80x9d. Subsequently, the most significant bit of the A/D conversion register is placed at xe2x80x9c1xe2x80x9d, and the A/D conversion reference voltage Vref 1 is supplied to the comparator in the A/D conversion module 3, which compares the A/D conversion reference voltage Vref 1 with the analog input Ain. If the compared result is Vref less than Ain, the most significant bit of the A/D conversion register is maintained at xe2x80x9c1xe2x80x9d, whereas if Vref greater than Ain, the most significant bit of the A/D conversion register is placed at xe2x80x9c0xe2x80x9d.
Carrying out the foregoing operation down to the least significant bit of the A/D conversion register, the A/D conversion module 3 stores into the A/D conversion register the digital value obtained by converting the analog input Ain.
With the foregoing configuration, the conventional A/D converter cannot obtain accurate A/D conversion data when the A/D conversion reference voltage Vref 1 includes noise. Thus, it includes the noise filtering module 2 for removing noise from the A/D conversion reference voltage Vref 1 so as to supply the noise reduced A/D conversion reference voltage Vref 1 to the A/D conversion module 3.
However, the conventional A/D converter has a problem of being unable to obtain the accurate A/D conversion data if the A/D conversion reference voltage Vref 1 includes noise that cannot be removed by the noise filtering module 2. In addition, it has a problem of increasing the circuit scale because of the noise filtering module 2.
The present invention is implemented to solve the foregoing problems. It is therefore an object of the present invention to provide an A/D converter capable of obtaining reliable A/D conversion data without increasing the circuit scale so much even if the A/D conversion reference voltage includes noise.
According to a first aspect of the present invention, there is provided an A/D converter including: an A/D operation controller for generating a bit-shift signal in response to a detection signal fed from a detector; and an A/D conversion module for carrying out A/D conversion with reference to an A/D conversion reference voltage, for discarding an A/D conversion resultant bit affected by noise in response to the bit-shift signal, for holding remaining A/D conversion resultant bits, and for restarting the A/D conversion from the discarded A/D conversion resultant bit after the noise becomes negligible. It offers an advantage of being able to improve the reliability of the A/D conversion data by discarding the A/D conversion resultant bit affected by sudden noise or crosstalk noise during the USB communication.
According to a second aspect of the present invention, there is provided an A/D converter including: an A/D conversion module for generating A/D conversion resultant data by carrying out A/D conversion of an analog input signal with reference to an A/D conversion reference voltage; and an A/D operation controller for deciding an A/D conversion resultant bit affected by noise in response to the detection signal and to the A/D conversion resultant data, and for outputting reliability information together with the A/D conversion resultant data. It can learn the reliability of the A/D conversion resultant data affected by the sudden noise or crosstalk noise during the USB communication. As a result, it offers an advantage of being able to improve the reliability of the A/D conversion data by discarding the A/D conversion resultant data with the reliability less than a certain level.